
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>

<html>

<head>
    <title>个人信息</title>
    <link href="<%=basePath %>css/bootstrap.css" rel="stylesheet" type="text/css" media="all" /><!-- bootstrap-CSS -->
    <link href="<%=basePath %>css/font-awesome.css" rel="stylesheet" type="text/css" media="all" /><!-- Fontawesome-CSS -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script type='text/javascript' src='<%=basePath %>js/jquery-2.2.3.min.js'></script>
    <!-- Custom Theme files -->
    <!--theme-style-->
    <link href="<%=basePath %>css/style.css" rel="stylesheet" type="text/css" media="all" />
    <!--//theme-style-->
    <!-- metatags -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Online Recharge Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, Sony Ericsson, Motorola web design" />

    <style>
        input{
            boder:0;

        }
        #ii{
         
        position: absolute;
        left: 1000px;
        top:400px;
        }
    </style>
    <link href="<%=basePath %>layui/css/layui.css">
    <script type="text/javascript" src="<%=basePath %>layui/layui.js"></script>
    <%
    Student s =(Student) request.getSession().getAttribute("stu");
    
    boolean b ;
    if(s.getSex().equals("男")){
    	b=true;
    }else{
    	b= false;
    }
    
    %>
</head>
<!-- /head -->
<!-- body -->
<body>
<!--header-->
<header>
    <%@include file="Top.jsp"%>
</header>
<!-- //header -->

<!-- innerbanner -->
<div class="agileits-inner-banner">

</div>
<!-- //innerbanner -->

<!-- breadcrumbs -->
<div class="w3layouts-breadcrumbs text-center">
    <div class="container">
        <span class="agile-breadcrumbs">
        	<a href="index.html">
        		<i class="fa fa-home home_1"></i>
        	</a>  
        	<span>个人信息</span>
        	<span>
        		<a href="<%=basePath %>his/selone">
        			　　　　历史订单
        		</a>
        	</span>
        	
        	<span>
        		<a href="<%=basePath %>stu/zhu">注销 
        		</a>
        	</span>
        	</span> 
    </div>
</div>
<!-- //breadcrumbs -->
<!-- Trains-list -->
<div class="agile-trains-list w3layouts-content" style="margin: 0px auto;">
    <div class="container" >
        <!--bus-single -->
        <div class="w3agile single-bus">
           <h3 class="w3-head">个人信息</a></h3>
            
            <!-- train-routes -->

            <!-- /train-routes -->
            <!-- bus-midd -->
            <div class="w3agile bus-midd">
                <div class="table-responsive">
                    <table class="layui table">
                        <thead>
                        </thead>
                        <tbody>
                        <tr>
                            <td>学号：</td>
                            <td><input type="text" id="stunum" class="stu" disabled="disabled"  value="<%=s.getNum()%>"></td>
                        </tr>
                        <tr>
                        <tr> <td>&nbsp;</td></tr>
                        <tr>
                        <td>账号： </td>
                          <td><input type="text" class="stu" disabled="disabled"  id="name"  value="<%=s.getName()%>"></td>
                    
                        </tr>
                        <tr>
                        <tr> <td>&nbsp;</td></tr>
        		      <tr>
                          <td>密码： </td>
                          <td><input type="text" class="stu" disabled="disabled"  id="department"  value="<%=s.getDepartment()%>"></td>
                    
                        </tr>
                        
                        <tr> <td>&nbsp;</td></tr>
                         <tr  >
                      
                            <td>性别 ： </td>
                              
                                 <td  > 
                                   <input type="radio" value="男"  checked="checked" id = "a" name="n"  >男 
                                	<input type="radio" value="女"  id = "b" name ="n">女
                                 
                                 <c:if test="<%=b%>">
                                 	<script type="text/javascript">
                                 		$("#a").attr("checked","checked");
                                 	</script>
                                 </c:if>
                                 
                                   <c:if test="<%=!b%>">
                                 	<script type="text/javascript">
                                 		$("#b").attr("checked","checked");
                                 	</script>
                                 </c:if>
                            	 </td>
                    
                        </tr>
                        
                       
                        <tr> <td>&nbsp;</td></tr>
                        <tr>
                            <td>班级： </td>
                              <td><input type="text"  class="stu" disabled="true" id="classes"  value="<%=s.getClasses()%>"></td>
                         </tr>
                        <tr> <td>&nbsp;</td></tr>
                        <tr>
                            <td>邮箱： </td>
                              <td><input type="text"  class="stu" disabled="disabled"   id="you"  value="<%=s.getEmail()%>"></td>
                    
                        </tr>
                        <tr> <td>&nbsp;</td></tr>
                        <tr>
                            <td>电话： </td>
                              <td><input type="text"  class="stu" disabled="disabled" id="phone1"  value="<%=s.getPhone()%>">
                          
                              
                              </td>
                    
                        </tr>
                        <tr>
                        <tr> <td>&nbsp;</td></tr>
 <tr>
                            <td>余额 ： </td>
                              <td><input type="text"   disabled="disabled" value="<%=s.getStu_money()%>"></td>
                    
                        </tr>

							<tr>
                            <td><input class="layui btn" type="button" id="wan"  onclick="xiu()" value="完善个人信息" >
                            <input class="layui btn" type="button" id="tijiao" onclick="gai()" value="提交" > </td>
                        </tr>
                        </tbody>
                    </table>
                    <div  id="ii">
                    <a href="http://47.107.106.245:8080/alipay.trade.page.pay-JAVA-UTF-8/index.jsp?useid=<%=s.getId()%>"><img alt="充值" src="images/cc.png" style="width:300px; height:300px; "> </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="myModalbook" role="dialog">
            <div class="modal-dialog">
                <!-- Modal content-->
                <div class="modal-content">
                    <div class="modal-header">

                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                    </div>
                    <div class="modal-body">

                        <form class="w3layouts-train-form" action="pay.html" method="post">
                            <div class="table-responsive">

                            </div>
                            <input type="submit" class="submit" value="Make payment"/>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
 
<script type="text/javascript">
		function xiu() {
			$(".stu").removeAttr("disabled");
		 }
		
		
		}
		 
		function  gai() {
			
			
			var num = $("#stunum").val();
			var name = $("#name").val();
			var sex = $('input:radio:checked').val(); 
			var classes = $("#classes").val();
			var	department  = $("#department").val();
			var	you  = $("#you").val();
			var	phone  = $("#phone1").val();
			alert(you)
			$.ajax({
				type : "POST",
				url : "<%=basePath%>stu/updatestu",
				dataType : 'json',
				data : {
					"num" : num,
					"name" : name,
					"sex" : sex,
					"classes" : classes,
					"department" : department,
					"email" : you,
					"phone" : phone,
					

				},
				success : function(result) {
					 if (result.status == 0) {
					 alert("修改成功！")
						 window.location.href="AboutCenten.jsp";
					}
					 	

				},
				error : function(result) {
					 
					alert("异常！");
				}

			});
			
		}
	
</script>
<!-- //Trains-list -->

<!-- subscribe -->

<div class="phone" id="mobileappagileits">
    <div class="container">
        <div class="col-md-6">
            <img src="images/ph1.png" class="img-responsive" alt=""/>
        </div>
        <div class="col-md-6 phone-text">
            <h4>校园充手机端上线了！</h4>

            <div class="text-1">
                <h5>Recharge</h5>
                <p>更加简单快捷的付款方式</p>
            </div>
            <div class="text-1"> </div>
            <div class="agileinfo-dwld-app">
                <h6>Download The App :
                    <a href="#"><i class="fa fa-android"></i></a>
                </h6>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="wthree-mobile-app"> </div>
    </div>
</div>
<footer>
    <div class="container-fluid">
        <div class="w3-agile-footer-top-at"> </div>
    </div>
    <div class="w3l-footer-bottom">
        <div class="container-fluid">
            <div class="col-md-4 w3-footer-logo">
                <h2><a href="index.html">校园充值系统</a></h2>
            </div>
            <div class="col-md-8 agileits-footer-class">
                <p >©© 校园充值系统   <a href="about.html" target="_blank">宏誉工作室</a> </p>
            </div>
            <div class="clearfix"> </div>
        </div>
    </div>
</footer>

</body>

</html>
<!-- /html -->